<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    {load href='/static/css/bootstrap.css'}
    {load href='/static/css/all.css'}
    {load href='/static/js/jquery-3.4.1.min.js'}
    {load href='/static/js/bootstrap.min.js'}
    {load href='/static/js/bootbox.min.js'}
    <style type="text/css">
        *{
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        body{
            width: 100%;
            background: #faf2cc;
        }
        .bigbox{
            position: relative;
            width: 100%;
            height: 50px;
            background: #ffffff;
            box-shadow: 0 1px 2px rgba(0,0,0,1);
        }
        .bigbox input{
            display: none;
        }
        .bigbox label{
            position: absolute;

            left: 240px;
            color: #666;
            padding: 20px;
            cursor: pointer;
            transition: all .5s;
        }
        .bigbox ul{
            position: absolute;
            top: 0;
            left: 0;
            width: 240px;
            height: 100vh;
            background: #2b3044;
            transition: all .5s;
        }
        .bigbox ul li{
            width: 100%;
            height: 50px;
            margin-bottom: 10px;
            list-style: none;
        }
        .bigbox ul li:first-child{
            display: flex;
            align-items: center;
            margin-top: 40px;
        }
        .bigbox ul li:first-child img{
            height: 50px;
            width: 50px;
            border-radius: 50%;
            margin: 0 25px;
        }
        .bigbox ul li:first-child span{
            color: #fff;
            font-size: 16px;
            white-space: nowrap;
        }
        .bigbox ul li a{
            display: flex;
            align-items: center;
            height: 100%;
            width: 100%;
            color: #d2d2d2;
            text-decoration: none;
            transition: all .5s;
        }
        .bigbox ul li img{
            width: 20px;
            height: 20px;
            margin:0 25px;

        }
        .bigbox ul li a span{
            font-size: 14px;
        }
        .bigbox ul li a:hover{
            color: #fff;
            background: rgb(47,183,204);
        }
        .bigbox input:checked + label{
            left: 0;
        }
        .bigbox input:checked~ul{
            left: -240px;
        }

    </style>
</head>
<body>
<div class="bigbox">
    <input type="checkbox" id="checkbox">
    <label for="checkbox">
        <img src="/image/home-active.png" alt="" width="30px" height="30px">
    </label>
    <ul>
        {if(isset($data))}
        <li><a href="/index.php/index/mycenter" target="content"><img src="/image/23.jpg" alt="1"><span>欢迎{$role}{$data['name']}</span></a></li>

        <li><a href="/index.php/Workr/index1" target="content"><img src="/image/打点.png" alt="3"><span>考勤打卡</span></a></li>
        {elseif condition="$role == '管理员'"}
        <li><a href="/index.php/index/mycenter" target="content"><img src="/image/23.jpg" alt="1"><span>欢迎{$role}{$name}</span></a></li>
        <li><a href="/index.php/index/index" target="content"><img src="/image/列表.png" alt="1"><span>员工管理</span></a></li>
        <li><a href="/index.php/Departmentr/index" target="content"><img src="/image/仓格号.png" alt="2"><span>部门管理</span></a></li>
        <li><a href="/index.php/Workr/index" target="content"><img src="/image/打点.png" alt="3"><span>考勤管理</span></a></li>
        {else}
        <li><a href="/index.php/index/login/"><img src="/image/23.jpg" alt="1"><span>登录</span></a></li>
        {/if}
<!--        <li><a href="#"><img src="/image/23.jpg" alt="1"><span>欢迎管理员</span></a></li>-->

        <li><a href="/index.php/index/mycenter" target="content"><img src="/image/person-active.png" alt="3"><span>个人中心</span></a></li>
        <li><a href="/index.php/index/updatepwd" target="content"><img src="/image/repair.png" alt="3"><span>修改密码</span></a></li>
        <li><a href="/index.php/index/logout/"><img src="/image/登出.png" alt="3"><span>退出登录</span></a></li>
    </ul>
</div>
{if($role=='员工')}
<iframe src="/index.php/Workr/index1" frameborder="0" name="content" width="90%" style="float: right;height: 80vh;margin-top: 3%;position: relative;text-decoration: none;"></iframe>

{else}
<iframe src="/index.php/index/index" frameborder="0" name="content" width="90%" style="float: right;height: 80vh;margin-top: 3%;position: relative;text-decoration: none;"></iframe>
{/if}
</body>
</html>